package org.yefei.homeworkday24;

import java.io.File;
import java.util.Date;

public class Zero {
	public static void main(String[] args) {
		// 0:输入一个文件夹名，输出这个文件夹中的文件信息
		File f = new File("F:\\叶飞io测试");
		if (f.exists()) {
			if (f.isDirectory()) {
				System.out.println("绝对路径：" + f.getAbsolutePath());
				System.out.println("目录名：" + f.getName());
				System.out.println("根目录：" + f.getParent());
				System.out.println("目录大小：" + f.length());
				long lastModified = f.lastModified();
				Date date = new Date(lastModified);
				System.out.println("最后修改时间：" + date);

				String[] list = f.list();
				for (String string : list) {
					System.out.print(string + "\t");
				}
				System.out.println();
				File[] listFiles = f.listFiles();
				for (File file : listFiles) {
					System.out.print(file + "\t\t");
				}
			}
		}
	}

}
